/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.vijay.mvnbuilddownload;

import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import org.apache.tools.ant.taskdefs.Get;
/**
 *
 * @author elangovanv
 */
public class BinaryDownload {

    private String location;
    public BinaryDownload(String locate) {
        this.location=locate;
		//System.out.println("intitate location:"+location);
    }

    public void downloadFile(File todir) throws MalformedURLException {
       Get get= new Get();
       get.setSrc(new URL(location));
       //System.out.println("location:"+location);
	   get.setDest(todir);
	   //System.out.println("todir:"+todir);
       get.execute();
    }

}
